package de.szut.gui.options;

import javax.swing.JList;

public class OptionsList extends JList<String> implements OptionsComponent {

	private static final long serialVersionUID = 402250464958099861L;

	private String key;
	
	@Override
	public String getOptionComponentState() {
		return getSelectedValue();
	}

	@Override
	public void setOptionComponentState(String newState) {
		setSelectedValue(newState, true);
	}

	@Override
	public String getOptionKey() {
		return key;
	}

	@Override
	public void setOptionKey(String key) {
		this.key = key;
	}

}
